package com.xhd.util;

import java.io.Serializable;
import java.util.Vector;

public class DataRelation implements Serializable {
	private static final long jm51 = 1L;
	  protected String relationName;
	  private Vector VDataRelation = null;
	  public DataRelation[] subDR = null;

	  public DataRelation()
	  {
	  }

	  public DataRelation(String paramString)
	  {
	    this.relationName = paramString;
	    this.VDataRelation = new Vector();
	  }

	  public Vector getRelationData()
	  {
	    return this.VDataRelation;
	  }

	  public String getRelationName()
	  {
	    return this.relationName;
	  }

	  public void setRelationData(Vector paramVector)
	  {
	    this.VDataRelation = paramVector;
	  }

	  public void setRelationData(Object paramObject)
	  {
	    if (paramObject == null)
	      return;
	    if (paramObject instanceof DataRelation)
	    {
	      this.VDataRelation = ((DataRelation)paramObject).getRelationData();
	    }
	    else if (paramObject instanceof Vector)
	    {
	      this.VDataRelation = ((Vector)paramObject);
	    }
	    else
	    {
	      if (paramObject instanceof String)
	        return;
	      if (this.VDataRelation == null)
	        return;
	      this.VDataRelation.clear();
	    }
	  }

	  public void setRelationName(String paramString)
	  {
	    this.relationName = paramString;
	  }

	  public Vector toVector()
	  {
	    return this.VDataRelation;
	  }

	  public boolean isNull()
	  {
	    return ((this.VDataRelation == null) || (this.VDataRelation.size() < 1));
	  }
}
